// 配置路由规则
// import Layout from '@/layout'
export default {
  path: '/approvals', // 路由跳转页面路径
  name: 'approvals',
  component: () => import('@/layout'), // 一级路由组件
  children: [{
    path: '', // 二级路由路径设置为空 可以同时显示 Layout组件和approvals组件
    name: 'approvals',
    component: () => import('@/views/approvals/index'), // 二级路由组件
    meta: { title: '审批', icon: 'tree-table' } // 左侧导航会读取路由里的meta里面的title作为显示菜单名称
  }, {
    path: 'salaryApproval/:id',
    component: () => import('@/views/approvals/salary'),
    name: 'salaryApproval',
    hidden: true,
    meta: {
      title: '工资审核',
      icon: 'approval', noCache: true }
  },
  {
    path: 'enterApproval/:id',
    component: () => import('@/views/approvals/enter'),
    name: 'enterApproval',
    hidden: true,
    meta: {
      title: '入职审核',
      icon: 'approval', noCache: true }
  },
  {
    path: 'leaveApproval/:id',
    component: () => import('@/views/approvals/leave'),
    name: 'leaveApproval',
    hidden: true,
    meta: {
      title: '申请请假',
      icon: 'approval', noCache: true }
  },
  {
    path: 'quitApproval/:id',
    component: () => import('@/views/approvals/quit'),
    name: 'quitApproval',
    hidden: true,
    meta: {
      title: '申请离职',
      icon: 'approval', noCache: true }
  },
  {
    path: 'overtimeApproval/:id',
    component: () => import('@/views/approvals/overtime'),
    name: 'overtimeApproval',
    hidden: true,
    meta: {
      title: '加班申请',
      icon: 'approval', noCache: true }
  },
  {
    path: 'securitySetting',
    component: () => import('@/views/approvals/security'),
    name: 'securitySetting',
    hidden: true,
    meta: {
      title: '设置',
      icon: 'approval', noCache: true }
  }]
}

// 当访问地址是 /approvals 的时候 layout组件会显示 此时 二级路由的默认组件  也会显示
